<template>
  <div id="wrap">
    <button @click="isShow = !isShow">按钮</button>
    <transition>
      <div v-show="isShow"></div>
    </transition>
  </div>
</template>

<script>
export default {
  name: "Anime1",
  data() {
    return {
      isShow: true,
    };
  },
};
</script>

<style scoped>
#wrap div {
  width: 150px;
  height: 50px;
  background-color: skyblue;
}
.v-enter,
.v-leave-to {
  opacity: 0;
  transform: translateX(200px) rotate(45deg);
}
.v-enter-active,
.v-leave-active {
  transition: all 0.5s linear;
}
</style>
